// var qiniu = require("qiniu");

exports.index = function(req, res) {
	res.render('index', {
		title: 'Express'
	});
}

exports.markup = function(req, res) {
	var input = "# Heading\n\nParagraph";
	var output = require("markdown").markdown.toHTML(input);


	res.render('markup', {
		title: '123',
		markup: output
	});
}

exports.i = function(req, res) {
	res.render('i', {
		title: ''
	});
}
/*
exports.qiniu = function(req, res) {
	// 配置密钥
	qiniu.conf.ACCESS_KEY = '0H44M4YxWeK7ZK-8v2RDpAouVTcQ-wV320dknx0K';
	qiniu.conf.SECRET_KEY = '1S6GULAycESWhrnNtvy3XGor6pj9VZjpm85pp1Sp';

	//实例化带授权的HTTP Client对象
	var conn = new qiniu.digestauth.Client();
	var bucket = "<YOUR_CUSTOM_BUCKET_NAME>";

	// 创建空间，也可以在开发者自助网站创建
	qiniu.rs.mkbucket(conn, bucket, function(resp) {
		console.log("\n===> Make bucket result: ", resp);
		if(resp.code != 200) {
			return;
		}
	});

	// 实例化 Bucket 操作对象
	var rs = new qiniu.rs.Service(conn, "<YOUR_CUSTOM_BUCKET_NAME>");


	res.render('markup', {
		title: '123',
		markup: output
	});
}
*/